Add next/previous key bindings to XenMon curses mode.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Mar 2006 22:47:53 +0000 (23:47 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Mar 2006 22:47:53 +0000 (23:47 +0100)
Signed-off-by: Diwaker Gupta <dgupta@cs.ucsd.edu>
tools/xenmon/xenmon.py

index a95f126a238661144bdbdc54e3519672c51ec341..366c5638de78e6afb5566751e0e8cd212317f428 100644 (file)
@@ -452,6 +452,12 @@ def show_livestats():
         if c == ord('c'):
             cpu = (cpu + 1) % ncpu
 
+        # n/p = cycle to the next/previous CPU
+        if c == ord('n'):
+            cpu = (cpu + 1) % ncpu
+        if c == ord('p'):
+            cpu = (cpu - 1) % ncpu
+
         stdscr.erase()
 
     _c.nocbreak()